package com.alongstudio.account.service;

import java.util.List;
import java.util.Map;

import com.alongstudio.account.commons.exception.BusinessException;
import com.alongstudio.account.entity.DictionaryContent;
import com.alongstudio.account.entity.DictionaryType;

public interface IDictionaryService {

	/**
	 * 分页查询
	 * 
	 * @param start
	 * @param pageSize
	 * @return
	 * @throws BusinessException
	 */
	Map findDictType(int start, int pageSize) throws BusinessException;
	/**
	 * 得到所有数据字典类型
	 * @return
	 * @throws BusinessException
	 */
	List<DictionaryType> findAllDictType() throws BusinessException;

	/**
	 * 创建类型
	 * 
	 * @param dictTyle
	 * @return
	 * @throws BusinessException
	 */
	boolean createDictType(DictionaryType dictType) throws BusinessException;

	/**
	 * 更新类型
	 * 
	 * @param dictType
	 * @return
	 * @throws BusinessException
	 */
	boolean updateDictType(DictionaryType dictType) throws BusinessException;

	/**
	 * 删除数据字典类型
	 * 
	 * @param id
	 * @return
	 * @throws BusinessException
	 */
	boolean deleteDictType(String id) throws BusinessException;

	/**
	 * 查找数据字典内容
	 * @param code
	 * @return
	 * @throws BusinessException
	 */
	List<DictionaryContent> findDictCotent(String code) throws BusinessException;

	/**
	 * 查找数据字典内容
	 * @param dictTypeId
	 * @param start
	 * @param pageSize
	 * @return
	 * @throws BusinessException
	 */
	Map findDictCotent(String dictTypeId, int start, int pageSize) throws BusinessException;
	/**
	 * 删除字典内容
	 * @param id
	 * @return
	 * @throws BusinessException
	 */
	boolean deleteDictContent(String id) throws BusinessException;
	/**
	 * 新增内容
	 * @param dictContent
	 * @return
	 * @throws BusinessException
	 */
	boolean createDictContent(DictionaryContent dictContent) throws BusinessException;
	/**
	 * 更新
	 * @param dictContent
	 * @return
	 * @throws BusinessException
	 */
	boolean updateDictContent(DictionaryContent dictContent) throws BusinessException;
}
